package pimp;

import javax.swing.*;


public class ApplicationError
{
    private ApplicationError()
    {
        System.out.println("ApplicationError initialization complied!");
    }

    private static class Singleton
    {
        private final static ApplicationError instance = new ApplicationError();
    }

    public static ApplicationError getInstance()
    {
        return Singleton.instance;
    }

    public static void showError(String error)
    {
        if(error != null)
            JOptionPane.showMessageDialog(GFX.getInstance(null).getMainPanel(),error,"Error",JOptionPane.ERROR_MESSAGE);
        else
            JOptionPane.showMessageDialog(GFX.getInstance(null).getMainPanel(),"Mein Got, ein null","Error",JOptionPane.ERROR_MESSAGE);
    }
}
